package com.hsgene.order.dto.agency;

/**
 * @Description: //机构订单详情流程图与位置的关系
 * @ProjectName: hdas-geneshop
 * @Package: com.hsgene.order.dto.agency
 * @Author: 江承良
 * @CreateDate: 2019/1/7 10:28
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public enum AgencyOrderPosition {

    // 1:样本待确认、2：报告待上传，3：报告待审核，4:待寄送，5:待签收，6:完成，7：终止

    /**
     * 样本待确认
     */
    WAIT_SAMPLE_CONFIRM(1,1),

    /**
     * 报告待上传
     */
    TESTING(2,2),

    /**
     * 报告待审核
     */
    PAID_FOR(3,3),

    /**
     * 待机构寄送
     */
    PENDING_PAYMENT(4,4),

    /**
     * 待签收材料
     */
    MAIL(5,5),

    /**
     * 完成
     */
    DONE(6,6),

    UNDEFINE(0,0);

    private Integer status;

    private Integer position;

    AgencyOrderPosition(Integer status,Integer position){
        this.status = status;
        this.position = position;
    }

    /***
     * 获取机构流程图展示位置
     * @author jcl
     * @date 2019/1/7 10:41
     * @param status
     * @return
     */
    public static Integer getOrderPosition(Integer status){
        for (AgencyOrderPosition agencyOrderPosition : values()) {
            if(agencyOrderPosition.getStatus().equals(status)){
                return agencyOrderPosition.getPosition();
            }
        }
        return AgencyOrderPosition.UNDEFINE.getPosition();
    }

    public Integer getStatus() {
        return status;
    }

    public Integer getPosition() {
        return position;
    }
}
